let lastCall = 0

/**
 * 节流函数
 */
export function throttle(fn, delay) {
    const now = new Date().getTime()
    if (now - lastCall < delay) {
        return
    }
    lastCall = now
    fn.apply(this, arguments)
}